UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/xVIkE9x/3yxNI/MC5C9ty1+5MT8D7X0QvO9eAvnduw='
WHERE
key_id = '7c7fd9b5610088039a7bf507aa8f63da6b972483fc7ad2c8720c757944e8a889'
AND (
token = '/xVIkE9x/3yxNI/MC5C9ty1+5MT8D7X0QvO9eAvnduw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)