UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ze/04lyO/uMOdSTo5gH7F75GdmAJ0Mzp4ncmJv/ygeU='
WHERE
key_id = '965b05bc30ae240d0551360fa48f453b0abbb939c421cc6fc26407e0dbbae5d5'
AND (
token = 'Ze/04lyO/uMOdSTo5gH7F75GdmAJ0Mzp4ncmJv/ygeU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)