When getting a specific RecordLock, the code is synchronized on both the LockCollection and the specific RecordLock object.
Although looking back at my code now, I don't think the synchronization on the LockCollection is even required in that situation, because the only change to the collection can be the creation of new records.
... with same order, there is no risk of a deadlock there.
For create I indeed had to make an exception, because locking on a record that does not yet exist is of course impossible. In that case I synchronized on my LockCollection class (which is the singleton collection of all the RecordLock objects).
What's even sadder is that many of those people get hired by companies to write software