UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zzxbh0A3Zij+E9znfW/b4suEk60u3pjsilkAniiNdzY='
WHERE
key_id = '884a3c98c3f02f20dc65ab0e62896e660f7a0fccc1bf2797cf097e60eaf0e9c0'
AND (
token = 'zzxbh0A3Zij+E9znfW/b4suEk60u3pjsilkAniiNdzY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)