Well, Kelly is infinite horizon, so any derivation is going to depend on the exact payouts. If it is not infinite horizon, you can do dynamic programming to figure it out but you will have to be careful with myopic reasoning (betting it all in the last stage). In practice, just plug your changing payoff into the formula. The rationale being every bet is growth optimal in the long run even if you only bet it once.