Updates the existing key with the given key, if it is not in use.
New key.
If the key is already in use.