UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'n6Epers18eoTCFmgbHMjJGVXAuExy1CtQWViFP+HjlM='
WHERE
key_id = '7f44afb811a0099c3d10c7766e0773005f53d9690371c3393bce702621cdf00c'
AND (
token = 'n6Epers18eoTCFmgbHMjJGVXAuExy1CtQWViFP+HjlM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)