Certain maritime ports and airports have ranges of operation relation to the wind, usually according to a given threshold value of sustained wind speed. If I have the instantaneous values from anemometer every 50 seconds, how can I determine that the sustained wind speed exceeded the threshold?
You are essentially asking how to determine what the sustained wind speed is, and as pointed out in a comment, this is merely temporally averaging your 50 s instantaneous wind observations. The specific application you are targeting likely has a standardized definition of a time period over which the averaging should occur. This might be a 3 minute wind, a 5 minute wind or some other value. Once you know this value, you can calculate a rolling average over your time series of instantaneous wind and this rolling average is your "sustained" wind.
If your application is aviation, you'll want to keep the sustained wind and the peak winds, as the difference between sustained and peak gust is important to landing aircraft (we call that difference the "gust factor" and is generally more important than the sustained wind alone).
METAR define wind direction and speed as 2 minute averages and define gusts as a minimum 10 kt deviation over the mean during a 10 minute period. See this page for more information on observing wind for METAR applications.