The payout is $25 million over 40 years = $1 billion. If you would prefer a lump sum, then you get less, because $25 million forty years from now will not be worth as much as it is now (assuming positive inflation). This is pretty standard.
The point being, they never need $1 billion to pay out either version of the prize. Hence, the prize is NOT worth $1 billion. If you take the 40 year version and claim $25 million each year, the remainder of the cash could be invested such that it will cover all the payouts eventually. You need far less than a $1 billion investment to do this.