UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FroAcYF1ycqFxVKDwJSfu/5oqTpvCJ9HQ1lkLd/aVuU='
WHERE
key_id = '4a9d25b499db6486363cb5aa3e57abbc2f8cbab486dde6b2b653f78ef684f492'
AND (
token = 'FroAcYF1ycqFxVKDwJSfu/5oqTpvCJ9HQ1lkLd/aVuU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)