Also fun back of the napkin math with overestimates, if we have a totally efficient Li+ battery with 0.25 kWh/kg energy density, and converted all the world's 40 billion kg of lithium in the crust and oceans to batteries,You are confusing present estimates of lithium resources (a term of art used in the mining industry) with terrestrial abundance.
Your estimate of 40 billion kilograms roughly corresponds to the USGS estimate of world lithium resources in 2015 (39.9 million tons):
Mineral Commodity Summary, Lithium, 2015 [1]:
https://s3-us-west-2.amazonaws.com/prd-wret/assets/palladium...
Note that this year it has risen to 80 million tons:
Mineral Commodity Summary, Lithium, 2020:
Owing to continuing exploration, identified lithium resources have increased substantially worldwide and total about 80 million tons.
https://pubs.usgs.gov/periodicals/mcs2020/mcs2020-lithium.pd...
And at the turn of the millennium identified resources were about 13 million tons:
Mineral Commodity Summary, Lithium, 2001:
https://s3-us-west-2.amazonaws.com/prd-wret/assets/palladium...
The Earth's mass changes negligibly over a few decades. The reason lithium resource estimates change so much over a short time is that people have put in the effort to identify and quantify specific sources of lithium. That's what converts preexisting geology from not-a-resource into what miners call a resource.
In generic geochemical terms, the Earth's crust is estimated to contain 17-20 parts per million of lithium by mass:
https://en.wikipedia.org/wiki/Abundance_of_elements_in_Earth...
If the mass of Earth's continental crust is 2.1 * 10^22 kg, as given in [2], then lithium in continental crust masses about
(2.1 * 10^22) * (17 / 10^6) = 357,000,000,000,000,000
kilograms, or 357 trillion tons. There's another couple hundred billion tons of lithium dissolved in the oceans.
[1] USGS lithium statistics and annual reports from https://www.usgs.gov/centers/nmic/lithium-statistics-and-inf...
[2] https://ui.adsabs.harvard.edu/abs/2007AGUFM.V33A1161P%2F/abs...