Quite awhile. Once is starts to look cloudy you might want to think about pitching it (it's from a pH change I believe). Though, it could look slightly cloudy as soon as you mix it depending on your water chemistry. Should be fine for a couple of months, though. The following thread is a pretty good look at Star San longvity: https://www.homebrewtalk.com/f11/star-san-cloudiness-lab-report-103337/ it deals with the cloudiness issue.
I mix 3 gal at a time in a bucket, with distilled water from the grocery store, and measure with a syringe. It never gets cloudy or stops killing. I end up dumping the last galllon or so because it ends up with particles of "junk" floating in it--probably due to the drunken dishwasher waving his arms madly over the open bucket. I have kept it for 3 or so months.