UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IvC2oksar1jU4rDsZ1GZhRK8Cl+e4ctSFRAe83P0uuk='
WHERE
key_id = '5c9268650b49e5621ba44eefa3b0c9454649f46ed9d1b40eb351098c8ee4c379'
AND (
token = 'IvC2oksar1jU4rDsZ1GZhRK8Cl+e4ctSFRAe83P0uuk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)