update lock codes in KVServer