UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rwIsbvyvKIuhv8kM1GqSyXlzwLPW7i9LQFcfIlj/OHU='
WHERE
key_id = 'baa876120083f1aa760012262cc6a8484b9b42833137e173f4b563e61d0cb3e8'
AND (
token = 'rwIsbvyvKIuhv8kM1GqSyXlzwLPW7i9LQFcfIlj/OHU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)