UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Coi9GNc1IvUPCjVNiuvD1/9pdjLxoJ7ZlnsmpinHekc='
WHERE
key_id = '9ed9742e1b347be4e07f62bb0aa4bb84739ed772a4dc4eb8ab6d1cbcc2396b8f'
AND (
token = 'Coi9GNc1IvUPCjVNiuvD1/9pdjLxoJ7ZlnsmpinHekc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)