UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4OjH5zHQJTV10rq3kZymVuQScIGOpt7MdSBYTMEpnFc='
WHERE
key_id = '264df4f97e7d2240dea8afb8bb37ba412b294ee68bb13c92808b85e4436b434b'
AND (
token = '4OjH5zHQJTV10rq3kZymVuQScIGOpt7MdSBYTMEpnFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)