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 ModeDSC HU/CM Inspection
1. Disconnect the DSC HU/CM connector..
2. Connect the negative battery cable..
3. Attach the tester lead to the DSC HU/CM wiring harness-side connector and
inspect voltage, continuity, or resistance according to the standard (reference)
on the table.
Standard (Reference)
...
Stop 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.
...
Drive Belt Removal/Installation [Skyactiv G 2.0]
WARNING:
A hot engine can cause severe burns. Turn off the engine and wait until it
is cool before servicing.
NOTE:
Remove/install the drive belt from the underside of the vehicle.
Generator Drive Belt Removal/Installation
CAUTION:
To prevent damage to the dri ...