All doors lock automatically when the lock side is pressed. They unlock when the unlock side is pressed.
Driver's door

Front passenger's door

To lock all the doors from an open front door, press the lock side of the door lock switch and then close the door.
NOTE
When locking the doors this way, be careful not to leave the key inside the vehicle.
Locking, Unlocking with Transmitter
Auto Lock/Unlock FunctionMazda 6 Owners Manual: Locking, Unlocking with Auxiliary Key
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 immediatel ...
Mazda 6 Owners Manual: Auto Lock/Unlock Function
WARNING
Do not pull the inner handle on a front door: Pulling the inner handle
on a front door while the vehicle is moving is dangerous. Passengers can fall out
of the vehicle if the door opens accidentally , which could result in death or serious
injury.
When the vehicle speed exceeds 20 ...