Hov, I know that you haven't passed the bar (and neither have I), but you know a little bit. Are the cops really illegally searching your shit?
Let's put this through a cursory crim pro analysis.
"My glove compartment is locked."
Excellent. Locking something shows that you have a reasonable expectation of privacy in the area to be searched. Generally, the police cannot search without probable cause and the lack of a search warrant is presumptively lack of probable cause. Also, telling him this impliedly negates consent.
However, you are in an automobile and the police had reasonable suspicion to pull you over. (You were doing 55 in a 54.) They have a right to ask you to step out of the car and according to the Terry stop-and-frisk doctrine, if you are unsecured (this means they haven't put you in handcuffs or placed you in the squad car), they CAN look in your passenger side to prevent destruction of evidence or if they think you are dangerous. (which the officer probably does b/c he thinks you are carrying a weapon)
The police can also search your trunk (and any containers within it) whether or not it's locked if they have probable cause to believe that there may be evidence of a crime or contraband in the car. Remember what we said before about the presumption of lack of probable cause if no search warrant? This doesn't apply to automobiles due to the "lower expectation of privacy" in a vehicle and the fact that the car is readily mobile ( you can take off with the contraband and evidence at any time--thus it's more of emergency enabling them to search right away).
So, through a very cursory bar level analysis, they probably had the right to search both.
Annnnd this is what I do all day.