UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zh4VQply/FviCdrsN0opakZr0sViUXlT+aKqf4iKVF0='
WHERE
key_id = '6ded3a7e9e37f5ede2f6234853097f0916c384904974025efd4456c721602bc7'
AND (
token = 'Zh4VQply/FviCdrsN0opakZr0sViUXlT+aKqf4iKVF0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)