In our case we applied for the extension about 45 days prior the expire.
I would highly recommend applying as soon as you can. In our case, my extension approval came after 5 months, and my wife's has still not yet come (it's almost 9 months now). And while we are in the maintained status...