Gas stations will keep their gas until the gasoline is sold.
Large gas stations may go through a storage tank of gasoline in as little as one day while some others it may take a week or a month to sell the gasoline.
Smaller gas stations usually only order enough gasoline that they know they can sell within a few months.
Because gasoline has a life of about 4 months in the gas storage tanks it's important to keep the gas flowing out of the tank and being sold.
Some gas stations may lower the price of gas slightly if they need to sell the gasoline soon before it goes bad.
But the gas station won't lower it too much.
A gas stations storage tank can hold between 12,000 gallons to as much as 24,000 gallons of gasoline.
Larger gas stations have larger underground storage tanks can sometimes go through the 12,000 gallons to 24,000 gallons in one day to 3 days and need a refill every day or at least every week.
A gas station will order a new tank of gasoline when the tank gets near empty or at least when they know when they are gonna need refilled.
I've worked at a gas station about 15 years ago that was in a small town of 500 people.
The gas station would order at least 3,000 gallons of gasoline and it would sometimes take 2 months to sell all that gasoline.
The gas station didn't make much profit on the gas but did better with the other stuff inside the store such as soda, chips, ice etc.
The gas stations storage tank was a 10,000 gallon tank but it was never kept completely full.