[PAXEXAM-609] Use immutable locks to synchronize shutdown process