UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mqR0C65jYm+pxIB9NQVvlnEUrHu0qBPcdVUmL4owgNA='
WHERE
key_id = '4cf41a89f9e0c474881ecee6d5c8980dc56d6c59f9e03eb4e0e84f04fbcdc0a9'
AND (
token = 'mqR0C65jYm+pxIB9NQVvlnEUrHu0qBPcdVUmL4owgNA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)