Mastery Upgrades

Mastery Tokens can be spent on four upgrades (blue up-arrow at the top left corner of the barrels list). They are both unlocked with the Barrel Mastery. They all have the same costs. The last one, which increases the v4's boost, is unlocked at x500 Stars and requires the previous upgrade on Level 1 or higher.

Costs

 * After that, +25 tokens every level

More Magnets
Focus on this one first. Its boost is massive.

More Golden Scrap
The second worst one when unlocked, but beneficial later on. A must have if you plan on getting tons of Golden Scrap; if you don't plan on farming soon you should get the other ones first. Very useful later on thanks to Position Upgrades.

More Tires
The third best mastery upgrade, it can double the tire gain speed. Very useful, as leveling the v5 is much faster then.

More Wrenches
Not very useful at first, as scrapyard v4 isn't very useful at that point. But it gets more useful later on paired with Positions Upgrades.

Better Boost
Can give hundreds of brick levels. Very good for getting more progress on stars. Unlocked at x500 stars.

Better Rewards
This upgrade was awful and it was recommended to stop leveling it at level 7 prior to update 10.9, which massively buffed league rewards. Now the upgrade boosts a decent easy-to-get magnet income. It's most useful for inactive players, but even very active players can profit well, although they should focus on other upgrades such as More Magnets and More Tires. Unlocked at x500 stars.

More Fragments
By far the worst one when unlocked, as fragments are nearly useless. Like the GS upgrade, this one also has a powerful effect later on, thanks to Position Upgrades. Unlocked at x500 stars.

More Steel Beams
The second best currently, as it doubles your beam gain. Unlocked at x500 stars.

More Scrap
One of the two worst upgrades. Can make prestiging / reaching new barrels a little bit easier and stars cheaper (but it's barely noticeable). Unlocked at x500 stars.

More Tokens
A powerful upgrade, definitely worth the tokens as it doubles your Combine Token income. Unlocked at x500 stars.

Faster Level Up
The fourth best one currently, as it makes you able to level up way faster, which gives you two benefits at the same time:
 * More Bricks by resetting the level
 * More Magnets (~30% more)

It used to require x1000 stars until the release of the v6, now it is unlocked at x1200 stars.

More Tokens II
Unlocked at x1400 stars. Very useful for those who don't have many Change Tokens, but not so useful for those who don't use as many as they get.