Upgrade from v39 to v40 failed with an error 404

Try this, from the 3.0 announcement post:

sudo rm /etc/yum.repos.d/_copr_sentry-kernel-ba.repo

Then try to update again.