It takes a moment for the flap load relief to activate, so I doubt a gust would trigger it, but it all depends how long you were above the trigger speed. Also the trigger speed is not always exactly as published I have seen them a few knots in either direction.
It can be a problem if you are heavy and have a high Vref and then start adding on 20kts for gusts. It may be prudent in these conditions to use flap 30 rather than 40.
S&L