Yes (and no). The door will be locked behind you and your mission is to escape by resolving all the mysteries of the room. For safety reasons however you can always use an emergency button to exit (this will end the game).