a seperate etcd lock function