UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RFD3KnNAPIxFl95hF+Eume78V1KSGJ5VFTGtFctFiNk='
WHERE
key_id = '591c670c3a42d47cea6ca9839d7bd4d4cfa92bbea49c79074ce387eb8dddca14'
AND (
token = 'RFD3KnNAPIxFl95hF+Eume78V1KSGJ5VFTGtFctFiNk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)