Not a problem. In our outfit, you use the emergency code and it triggers a continuous charm and then the door will unlock automatically after 30 seconds.
Quite useful also when pilots or cabin crews inadvertently close the cockpit door on ground when noone is inside. xD