Versio 0.40.0 really sounds like a version installed using apt and not using snap. Did you remove all non-snap versions of Certbot as instructed by the Certbot instruction guide?
Further more, if I understand Managing updates | Snapcraft documentation correctly, snaps are updated automatically.