UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RIKwm5GubwHGtLWzPYlPNMl931jaeG3ch3wr/TnYxIE='
WHERE
key_id = '6f250c5f8bdecf67cfff39158929d9b3189a306ae45b91efdac750d5095c47ea'
AND (
token = 'RIKwm5GubwHGtLWzPYlPNMl931jaeG3ch3wr/TnYxIE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)