I got this while trying for the Robin Egg achievement. Using the guide for that achievement, playing on chilled mode at 25% speed. Take your time and wait till it is clear to go for the 1ups and the achievement will be yours in no time.
Alternatively, you could get this while going for the 1up yours achievement. Just follow the guide to find the special 1up pie and it should give you 30 ships. Don't loose any and beat the level and the achievement is yours.
Edit: (Credit to Buckswana) If you are going for this achievement and the game will not let you get to 30 ships (ie: You get to 24 ships and the game says max ships and the 1 ups start blowing up after a few seconds), Buckswana found a fix. If you exit the game using the in game exit button instead of the home button or back arrow this should fix the issue. For whatever reason it corrupts the game when you exit any other way.