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 ModeMap Light Bulb Removal/Installation
1. Disconnect the negative battery cable..
2. Insert a tape-wrapped fastener remover into the service hole and pry with
the screwdriver in the direction shown by the arrow to remove the lens.
3. Remove the map light bulb.
4. Install in the reverse order of removal. ...
Restraints SST [Standard Deployment Control System]
49 H066 002
Deployment tool
49 D066 002
Adapter harness
49 L066 002
Adapter harness
49 B066 004
Adapter harness
49 N088 0A0
Fuel and Therm ...
Brake Fluid Pressure Sensor Inspection
1. Switch the ignition to off.
2. Install the SSTs to the master cylinder (secondary side) as shown in
the figure.
NOTE:
When installing the SST (49 D043 0A0) to the master cylinder, use
a commercially available flare nut wrench (flare nut across flat 12 mm {0.47
in}).
...