UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IXDPLNOoxgQtb7dT/qyMVTd7vFYCo4qQe64FA/aaeI0='
WHERE
key_id = '5caa51ab1ef6d0be51d0b153ed0a69b1baa550c39ba2b2a09a8c2c9dc1384e8c'
AND (
token = 'IXDPLNOoxgQtb7dT/qyMVTd7vFYCo4qQe64FA/aaeI0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)