How are you firing your keggle? I use a 2400kw immersion element on mine and can squeeze out a 40L batch. It's a bit fiddly as the final 8L or so of runnings are captured in a separate pot and boiled on the stove - this is then added back to the keggle over the course of the boil (assuming big 60 minute boil). Other option as noted above is to brew to a higher strength and dilute in the fermenter.
If using gas, you could struggle to get 40L final volume due to the much more vigerous boil leading to a higher chance of boil over. Even on electricity I need to watch the keggle pretty closely at first.
Edit: probably should mention I normally brew 22L, but do pump out the occasional bigger batch.