Distributed lock implementation