I implemented this. The only gotcha now is to account for the situation where the node crashes between the time the lock is acquired and setting the expiry. Should still be less code now overall.