UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jmtQ5AWMgwXfF9T6haO/Gy19sLez4ZLrIFToBDXHFqs='
WHERE
key_id = '64ce564c6da319a03103202048012587482e4fb74e5afc794166ca5cee995e46'
AND (
token = 'jmtQ5AWMgwXfF9T6haO/Gy19sLez4ZLrIFToBDXHFqs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)