only update key when it doesn't exist