UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Um/Xx8vgRwrzr/Had8ww3tcupSrmjHxPHEKyvWK67+4='
WHERE
key_id = '6c2da2a33fd76c387e0bf3bf0d79d58f35c22c25d294ae76f27fd07f649353a1'
AND (
token = 'Um/Xx8vgRwrzr/Had8ww3tcupSrmjHxPHEKyvWK67+4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)