Keyless locking with self-cancellation, e.g. resulting in an unlocking action when the door is being closed