One of the many purposes for learning/practising scales is to increase dexterity. In two and three octave scales, and ordinary majors in all keys will do this, the thumb must move from one hand position to the next twice in each octave (except the last going up r.h. and last going down l.h!) so playing scales is a very good excercise. Another scale that works well is the chromatic - where every black key gets a middle finger, and thumb gets to play D,F,G and A (r.h.) and C,A,G and F (l.h.).
Arpeggios do the same sort of job in getting the thumb to be quicker and smoother.
Also, try playing all of these in different rhythms. For example, chromatics in 2s, 3s, 4s, etc, so the emphasised notes differ each time with different fingers taking the emphasis.