Fixed race between lock lease extend and lock lease expiry.

There are some migration issues too. I'm working on better solution. I'll update pr soon.