Turn the auxiliary key toward the front to lock, toward the back to unlock.
To lock
All doors lock automatically when the driver's door is locked using the auxiliary key.
To unlock
The driver’s door unlocks when the auxiliary key is turned briefly to the unlock position and then immediately returned to the center position.
All doors unlock when the driver's door is unlocked and the auxiliary key is held in the unlock position for one second or longer.

Door Locks
Locking, Unlocking with Request Switch, Door Handle (With the advanced keyless
function)Mazda 6 Owners Manual: Identification Numbers
Vehicle Information Labels
Vehicle Identification Number
The vehicle identification number legally identifies your vehicle. The number
is on a plate attached to the cowl panel located on the left corner of the dashboard.
This plate can easily be seen through the windshield.
Motor Vehicle Sa ...
Mazda 6 Owners Manual: Cargo compartment light switch inspection
1. Remove the liftgate lower trim. (See LIFTGATE LOWER TRIM
REMOVAL/INSTALLATION)
2. Disconnect the cargo compartment light switch connector.
3. Inspect for continuity between the cargo compartment light switch
terminals using an ohmmeter.
If not as specified, replace the liftgate lock.
...