Can always disconnect the battery for a few hours to reset the ECU.
Maybe it'll relearn the fuel parameters.
Still sounds like bad fuel. Put some octane booster in it with 87 or fill up with 91 or higher. I bet it the noise goes away.
If it doesn't you tell Mazda you've tried everything and the noise persists. Don't leave until it's fixed.
Ping / Knock is not good. Detonation on a forced induction can do harm after time.