If the selector lever will not move from P using the proper shift procedure, continue to hold down the brake pedal.
1. Remove the shift-lock override cover using a cloth-wrapped flat head screwdriver.
2. Insert a screwdriver and push it down.

3. Press and hold the lock-release button.
4. Move the selector lever.
Take the vehicle to an Authorized Mazda Dealer to have the system checked.
Shift-Lock System
Transaxle RangesMazda 6 Owners Manual: Dtc clearing procedure
1. Start the on-board diagnostic test mode.
2. First press the POWER button, then simultaneously press AUDIO CONT button
for 2 seconds or more.
Caution
Before clearing the DTCs, be sure to enter all of them displayed
in the on-board diagnostic test mode in the Audio Repair Order Form. ...
Mazda 6 Owners Manual: Drive belt auto tensioner inspection
1. Remove the drive belt. (See DRIVE BELT REPLACEMENT.)
2. Verify that the drive belt auto tensioner moves smoothly in the
operational direction.
Replace the drive belt auto tensioner if necessary.
3. Turn the drive belt auto tensioner pulley by hand and verify that it
rotates smoothly ...