UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5+nPiqzPTjEk/RgWI+eSFx2cEd3XiOt0GS8OYd2DEog='
WHERE
key_id = '040a9d4ef3e8666b8a60eb19631d95947351d4e02760ecb928f754851f7b7a6d'
AND (
token = '5+nPiqzPTjEk/RgWI+eSFx2cEd3XiOt0GS8OYd2DEog='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)