In the demo version there are locked doors, weren't there?
I only encountered locked chests in the current version. And you have to drag your key from the backback onto the chest there.
There is even a key sword. But is only usable once and gets destroyed if you open a chest with it.