Sonnet made an upgrade for '040s that used a carrier device that harbored a 40MHz '040 and plugged into the original processor socket. The carrier doubled the clock input of the system bus, thus the processor ran at the full frequency.
Since it's only a 40MHz chip, I've only seen one machine that had a 20MHz processor to replace, and that was the Quadra/Centris 610. I've tried using the upgrade in a 25MHz bus machine (which overclocked the processor to 50MHz), but it usually overheated, so all I could ever use it in was the 610. If you can find one of these upgrades on eBay, you can always try it yourself.
As far as other methods, only replacing the clock crystal like equill said would get you a faster processor. However, it would probably be flaky at best as other chips on the board may not be able to handle the higher frequencies.