I would create a key structure, where the key got an unique id. And rather push the key into a keyArray in the controller or Character.
When it is relevant, loop trough, the players keys, check if the id of one of the keys match the id for the lock.
Might be a good blueprint library actually, keymanagment, not quite a inventory but almost.
That also support the idea of consumable keys, aka you could remove it from the array when used.