hehh a but chaotic and long description... but if you already have the rooms, corridors and open doors, it is not a big thing to create a solvable lock-key system:
place all the locks;
floodfill from start tile defining locks as impassable tiles;
while filling note if a lock was examined as neighbouring tile;
when floodfill ends check which locks were touched;
place randomly these keys in any floodfilled tile;
define these touched locks as passable;
continue floodfill and repeat key placing...
finally transfer money to me
