Short answer: they lied, it's 12, not 30 tonnes extra carrying capacity on the A340 due to being a quad.
How does an wing-mounted engine provide extra payload?
The weight (force) of the engine times the distance to the wing root is a torque (force * distance) that bends the wing down. The farther out the engine, the bigger this torque.
This downward torque reduces the upward torque (from the lift) experienced by the wing. You can think of it as the lift force from the spanwise aerodynamic center $y_{MAC}$ to the wing root -- more on that in a bit. So, if the plane is wing-limited (structurally), any extra bending relief will allow more weight to be lifted.
It was also why the 707 had better payload compared to the Vickers VC10 (its 4 engines are tail-mounted). The wings had to be built stronger (heavier), which ate into the payload (vc10.net).
That is one of the reasons that especially the Standard VC10 is more expensive to operate than a 707, its structure is slightly heavier for the same number of passengers (25,7% of MTOW as opposed to 24,6% for the 707).
Does it really account for 30 tonnes?
No. It turns out Airbus was lying. But it does account for some.
The lying part first. According to John Leahy -- an Airbus exec of 33 years -- from a Jan 2018 interview on leehamnews.com (good thing you asked in 2018):
The 330 was intentionally being held down in takeoff weight and performance because they didn’t want it to overlap the 340.
So, how much was engines and how much was being held back?
The A330 (and A340) like many jet-liners gain MTOW as they fly more. Small steps at first after design validations, then big steps after modifications. So in order to have a fair comparison, we need to go back in time.
The quoted reference is from 1991, but the A330 entry-into-service (EIS) MTOW was not 30 tonnes below the A340. That figure was based on the 1986 MTOWs of 204 and 232 tonnes for the A330 and A340 respectively (flightglobal.com).

(Graph: Airbus) A330-300 MTOW increase over the years. Note that the neo starts at where the ceo left -- at 242 with further development to reach 251 tonnes as announced in March 2018 (leehamnews.com).
As you see, the A330's EIS MTOW was 212 tonnes (a 20-tonne gap, not 30). Without major modifications it reached 217 (a 15-tonne gap, not 30).
Are the 15 tonnes due to the outboard engines?
Yes. First, back to the $y_{MAC}$. See: Where is the lateral position of the aerodynamic center?
Calculating it for the A330 based on its available plan view and ignoring the Yehudi gave me an 8.9 m figure (from wing root). Taking into account the complex shape would, I believe, move it farther inboard, giving the engines an even bigger edge -- so we are okay there.
The engine stations are at 6.4 and 16.5 m from the wing root. And the engines weigh 6.16 (Trent 700 on the A330) and 3.99 (CFM56-5C on the A340) tonnes.

With those figures, the A330 engines provide a downward torque (bending relief) of 39.4g kNm (per side). The more spread out A340 engines (but also each ~2 tonnes lighter) provide 91.4g kNm (per side).
By taking into account the 8.9 m $y_{MAC}$ and the higher 217-tonne MTOW, my results are:
11.67 tonnes of the 15-tonne gap are indeed due to being a twin and not a quad. The remaining 3.33 tonnes are likely due to my lenient $y_{MAC}$ -- moving it more inboard gives the engines more credit.
If you are wondering about the original 204-tonne figure, then they held back 16.3 tonnes (72.6g kNm per side). So the original statement should have been an approximately 12 tonne extra carrying capacity, not 28 (or 30) -- but they didn't want to hurt the A340 sales.
This was a lot of fun, and it's nice to see how the A330 EIS final gain (13 tonnes from 204) is close to my estimate.
Original 3-view drawings:
- https://commons.wikimedia.org/wiki/File:A330FAMILYv1.1.png
- https://commons.wikimedia.org/wiki/File:A340FAMILYv1.1.png