UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xa2UoCI6j3BBSNMhZKrZWCAYJ0a9G/oQ32uP7exxKZg='
WHERE
key_id = '33a9f604497ed08c1d1c89fe6d72ad1c9c6dbca8d1cc08012e94aebcbef9deea'
AND (
token = 'xa2UoCI6j3BBSNMhZKrZWCAYJ0a9G/oQ32uP7exxKZg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)