UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm+0rVo9p+Cpeg8Ush0Y664I4iExkcw0bQAkPI7vOkpE='
WHERE
key_id = 'cc72ef077b643431d4c09eb9ef8e8ed99c6a994741d26e695fc9de110dba3299'
AND (
token = 'm+0rVo9p+Cpeg8Ush0Y664I4iExkcw0bQAkPI7vOkpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)