IdBasedLock implementation