Weird twitching in toddler

My daughter is 2 years old, however she has been doing this particular thing since about 10 months old. At random times, she'll squeeze her eyelids shut extremely tight over and over (occurring like every 2 seconds), almost like a twitch. She'll do it for about 30 minutes at a time, and then stop out of nowhere. It's never really concerned me until about a few weeks ago when she started complaining of headaches almost on a daily basis and the weird blinking seemed to happen more frequently. Prior, I figured that it was just a weird quirk she had, but now I'm worried that it could be something else. Her doctor's appointment is next week, but just wanted to see if anyone else's toddlers do this as well.