UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FSi0QlaRG6HX0idkuvyhAE5yYHzjC8guWOlbH2prvFs='
WHERE
key_id = '76462cbc852c40a128dd3a42918d899a783ae3f8ffd49a8503f5c636dce039d6'
AND (
token = 'FSi0QlaRG6HX0idkuvyhAE5yYHzjC8guWOlbH2prvFs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)