UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BZQT9OvwY+RzeUJN6xOKaM2WGoD/m7KEiAdPQKSfJO0='
WHERE
key_id = '63d6ccb0e4b0b09f87ddbc09e7938f26036a70fa6a35a4c9e1fdbcd14d1efd70'
AND (
token = 'BZQT9OvwY+RzeUJN6xOKaM2WGoD/m7KEiAdPQKSfJO0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)