If your vehicle is equipped with remote keyless entry, you have lockout protection. This feature stops the power door locks from locking when the keys are in the ignition and the door is open.
If the power door lock switch is pressed when a door is open and the key is in the ignition, all the doors will lock and the driver's door will unlock.