If the version of mongodb in your brew receipe is the same of the version installed, you get the stated error.
Typically when you see a latest stable version released and you wish to bump up your mongodb version to it, you’d first have to update your brew receipe and then do your upgrade as you did.
That means you’d first do
brew update
and then
brew upgrade mongodb