In an ideal situation where you do not lose ships: yes, the upgrade to an Exhumer fom Mining barge will make more ISK.
EVE however is less than an ideal world and you will lose ships. Depending on how often you lose the ship, the upgrade may or may not be worth it.
Let’s take a hypothetical situation where you lose a Mining barge each time it has paid for itself twice. The ganks are annoying, but at least you’re positive in ISK. If you were to fly an Exhumer in this situation to mine a little more yet died at the same rate as the Barge, you would quickly go bankrupt.
If you on average lose the Exhumer before the increased mining rate from the upgrade paid off the increased price, the mining barge will make more ISK. If you die less often than that: go for the Exhumer!