The normal practice is for the restaurant manager or head waiter to secure the restaurant public and kitchen exit doors and deposit the keys at the Chief Steward's office. For inter alia fire safety reasons all such keys would be duplicated in the Chief Steward's key cabinet.
The public room stewards would have a similar regime except that most 'topside' public rooms are not necessarily locked during passage.
Security and fire safety becomes much more important during turnround between voyages when shore labour is aboard and a skeletal relief staff are working.
Noel