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 ModeStop Vehicle in Safe Place Immediately
If any of the following warning lights turns on, the system may have a
malfunction. Stop the
vehicle in a safe place immediately and contact an Authorized Mazda Dealer.
...
Front Door Latch And Lock Actuator Inspection
1. The following actuators and switches are integrated with the front door latch
and lock actuator. Inspect the front door latch and lock actuator according to each
inspection procedure for the following items.
Front door lock actuator.
Door lock-link switch.
Door latch s ...
Console Removal/Installation
1. Disconnect the negative battery cable..
2. Remove the following parts:
a. Upper panel.
b. Shift knob (MTX).
c. Selector lever knob (ATX).
d. Shift panel.
e. Side wall.
3. Remove the bolts.
4. Remove the screws.
5. Pull the console in the direction of the arrow shown in t ...