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 ModeExhaust System Removal/Installation [Mzr 2.0, Mzr 2.5]
WARNING:
A hot engine and exhaust system can cause severe burns. Turn off the engine
and wait until they are cool before removing the exhaust system.
1. Remove the battery cover..
2. Disconnect the negative battery cable..
3. Remove the plug hole plate..
4. Remove in the order ...
Sirius Satellite Radio Unit Removal/Installation
1. Disconnect the negative battery cable..
2. Remove the following parts:
a. Passenger-side front scuff plate.
b. Passenger-side front side trim.
c. Dashboard under cover.
d. Grove compartment.
e. Passenger-side lower panel.
3. Remove in the order indicated in the table.
...
Security Setting (Type A)
If a passcode is set, the system cannot be
activated unless the passcode is input.
NOTE
Do this function only when parked. It is
too distracting to attempt while driving
and you may make too many errors to be
effective.
Passcode setting
Press the pick-up button or talk button
with a sho ...