UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iaU8cVw1248cAtpsnVbt6+TaGdC+0pKJRY0yTUljGqI='
WHERE
key_id = 'f1195eb1de998ef918318b901a733f53b4dee6bd1c530579c0f21544a205ee91'
AND (
token = 'iaU8cVw1248cAtpsnVbt6+TaGdC+0pKJRY0yTUljGqI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)