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 ModeNon Return Valve Inspection [Mzr 2.0, Mzr 2.5]
WARNING:
Fuel is very flammable liquid. If fuel spills or leaks from the pressurized
fuel system, it will cause serious injury or death and facility breakage. Fuel
can also irritate skin and eyes. To prevent this, always complete the “Fuel
Line Safety Procedure”, while referring ...
Auxiliary Jack Inspection
1. Disconnect the negative battery cable..
2. Remove the following parts:
a. Upper panel.
b. Shift lever knob (MTX).
c. Selector lever knob (ATX).
d. Shift panel.
e. Side wall.
f. Console.
g. Auxiliary jack.
3. Connect a commercially-available nonresistant plug to the auxiliary jac ...
Electric Power Steering Oil Pump Component Disassembly/Assembly
CAUTION:
The internal parts of the EHPAS control module and motor could be damaged
if they receive an impact. Be careful when handling the EHPAS control module
and motor to prevent the component from getting hit. Replace the electric power
steering oil pump component if it has recei ...