If the selector lever will not move from P using the proper shift procedure, continue to hold down the brake pedal.

Take the vehicle to an Authorized Mazda Dealer to have the system checked.
Shift-Lock System
Manual Shift ModeNo.27 Fuel Refill Concerns [Mzr 2.0, Mzr 2.5]
27
FUEL REFILL CONCERNS
DESCRIPTION
Fuel tank does not fill smoothly.
POSSIBLE CAUSE
PCM DTC is stored
Nonreturn valve malfunction
Improper use of fuel ...
Front Tilt Motor Inspection
1. Remove the battery cover..
2. Disconnect the negative battery cable and wait 1 min or more..
3. Disconnect the front tilt motor connector.
4. Apply battery positive voltage to the front tilt motor terminals and inspect
the front tilt motor operation
If not as specified, replac ...
Crankshaft Position (CKP) Sensor Inspection [Mzr 2.0, Mzr 2.5]
Visual Inspection
CAUTION:
When foreign material such as an iron chip is on the CKP sensor, it can cause
abnormal output from the sensor because of flux turbulence and adversely affect
the engine control. Be sure there is no foreign material on the CKP sensor when
replacing.
...