This can be done in one statement:
UPDATE (SELECT new_key, new_record,
MAX(key) OVER(ORDER BY key) as minimumKey,
COUNT() OVER(ORDER BY key ROWS UNBOUNDED PRECEDING) + 1 as offsetKey
FROM MyTable) MyTable
SET new_key = minimumKey + offsetKey
WHERE new_record = 0;
(untested, because I don't have an LUW instance to use)
If there are rows with new_record <> 0
, there will be gaps in the sequence of the new keys (my personal belief is that the actual value of a key is unimportant, so don't worry about that).