What I was told was when a human starts exercise they will get a mucus/phlegm discharge from where the lungs are working more. Clearing the pipes in a sense and horses do the same thing. If it's only with exercise I wouldn't worry too much. If it was any other time, I would look into it more. Mine do the same whenever they move a bit more after standing around especially when stabled.
First thing I would look into is allergies, otherwise that's a horses way of relaxing (along with snorting and sneezing). My mare does that all the time when we get moving and the way I check to make sure nothing is wrong is if her outside ear is flopping around it means she's comfortable.
Many horses do that whenever they go up a pace purely because it's easier to cough when they're moving quickly. If you having noticed breathing/health issues then you shouldn't worry about it. Almost all horses do it.
One of my geldings does the exact same thing and he is only 6! He has had many test and has tried many breathing products but nothing really works. He is just reactive to the sand in arenas. I ride him more in our grass derby field and he doesn't cough as much. There really isn't much to do to fix this other than try some berating supplements ( most are very expensive though) or what I do is wet my horses feed which seems to help him a little bit! Hope this helps!