Can the breaker on a sub-panel be rated for more amps than the main breaker?
If the current panel is fed from a 40 ampere breaker, with wire rated for 40 amperes. Installing a 50 ampere breaker in the second panel is pointless, since the 40 ampere breaker will trip before the load can draw 50 amperes.

If you want to upgrade to a 50 ampere breaker in the second panel, you'll have to upgrade the breaker in the main panel, and the conductors feeding the second panel. Then you can install a 50 ampere GFCI breaker in the second panel.



After new info.

If you're putting in a 50 ampere breaker; even simply for GFCI protection, all the wiring downstream of the breaker must be rated for 50 amperes. 

A circuit breaker is designed to protect the wiring and devices connected to it. If you have a 30 ampere load (the spa) protected by a 40 or 50 ampere breaker, than the load and wiring could carry 40 or 50 amperes before the circuit breaker even thinks about reacting.  So unless the wiring is sized to dissipate that amount of heating, then you're creating a dangerous situation.  

My advice is to put a new 30 ampere GFCI breaker in the second panel. If that's all that the spa requires, why muck about with anything else.  If the store doesn't have what you need, order it, or go to a different store.

The best way to know for sure, is to contact the local Electrical inspector. It's going to be their call as to whether or not they pass your wiring.