UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IQRQOS9B3Hjgo/z61igdCotoXtV0SOjZyxaXWifnlmw='
WHERE
key_id = '79903a1640bf98e1fc1bc1d1426b31a441cee12884dc01efb7725ef7c7ddc92f'
AND (
token = 'IQRQOS9B3Hjgo/z61igdCotoXtV0SOjZyxaXWifnlmw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)