What do you mean? That after you've unlocked a treasure chest with a key-stone, you wish to lock it again? I'm 98% sure that it's impossible, once open, always open. I'm confidently accustomed with all the buyDebug objects and the cheat commands that go along with them and I've never seen any way to lock them, in that case you have to create a new chest. If you mean a tomb you haven't created, then I can say to you that they never resets and will stay open, although the treasure they're holding might regenerate.