One possible solution is to shift your transmission to neutral (if you have automatic transmission), and try to start the engine from "N". This is because even if you had the car in "P" park mode, the transmission might still get stuck at "D", so the vehicle is not allowing you to start.
By shifting the transmission around and finally to "N" neutral, you might be able to unstuck the transmission and get your car started.
Link:
Car no start troubleshooting
Mazda Forum
Mazda3 FAQ