added expiration feature for locks