UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IyM1ZC4AJgbfR24Gkq5omUcxA/p6gcrGIGO0XA5+WRg='
WHERE
key_id = 'ba3aa653a4b3342843a351795f463ab78b712a25514f15482b3cc07e4606fcf6'
AND (
token = 'IyM1ZC4AJgbfR24Gkq5omUcxA/p6gcrGIGO0XA5+WRg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)