Once you find the exit key (labeled 'exit'), there's a set of double doors on the main floor, by the security room. Use the key on that door and you win.
Since it's RNG I can just blame my abysmal luck on never winning. Thankfully it isn't set to the last door to unlock, or I'd be 100% screwed. Thanks for letting me know.