UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pq4eg/pX1Y7K/Oaj2brYrtjZuSYd7+HWg0NA1hF4ev0='
WHERE
key_id = '2bf520d4a75c9d8e60988b820327500af128f723fe6b5bf8f2d0015a64d22d22'
AND (
token = 'pq4eg/pX1Y7K/Oaj2brYrtjZuSYd7+HWg0NA1hF4ev0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)