UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0Qek/TbzQG4wj/j7vyBph1Ho113dL7MPEDe6ZbQipw8='
WHERE
key_id = '1e95b62c4ac83b3806cb03124f8e274d3888d917c4a56d1cdf861ff041ff8060'
AND (
token = '0Qek/TbzQG4wj/j7vyBph1Ho113dL7MPEDe6ZbQipw8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)