UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FqSjQMi/50KpyD+1/0o0R91V8KdISXkxHE6ay1f8Q6U='
WHERE
key_id = '01d85c7e64ec27db66ee77822ca133f11923659393180cd0dd50ea15e1aa68c4'
AND (
token = 'FqSjQMi/50KpyD+1/0o0R91V8KdISXkxHE6ay1f8Q6U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)