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 ModeFront Seat Cover Removal/Installation [Vehicles Without Power Seat System]
WARNING:
Handling a front seat (with built-in side air bag) improperly can accidentally
operate (deploy) the air bag, which may seriously injure you. Read the service
warnings before handling a front seat (with built-in side air bag)..
CAUTION:
After removing a front seat ...
Jacking Positions, Vehicle Lift (2 Supports) And Safety Stand (Rigid Rack) Positions
Jacking Positions
WARNING:
Improperly jacking a vehicle is dangerous. The vehicle can slip off the jack
and cause serious injury. Use only the correct front and rear jacking points
and block the wheels.
Use safety stands to support the vehicle after it has been lifted.
...
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 Thermometer checker
...