UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7Ec1Oh6+dYfNVATfcfxtW5ogxyjBZDg3xYVZ77mMUoo='
WHERE
key_id = 'c3e1de4ad0540ba1e71a31f8eda7ab7b5f754493e33826bb612a5ce7f6336008'
AND (
token = '7Ec1Oh6+dYfNVATfcfxtW5ogxyjBZDg3xYVZ77mMUoo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)