UPDATE
  merchants
SET
  first_key = md5((''::text || now()::text) || random()::text),
  first_ttl = CURRENT_TIMESTAMP + (10 * interval '1 minute'),
  second_key = md5((''::text || now()::text) || random()::text),
  second_ttl = CURRENT_TIMESTAMP + (20 * interval '1 minute')
WHERE
  id = $1
RETURNING first_key as first_key, second_key as second_key