You don't have to wait until your license is about to expire to take your Continuing Education course(s). You can complete your Continuing Education at anytime during your renewal cycle.
Once you've completed your course(s), hold onto your certificates of completion until you receive your renewal paperwork from the state. At that time, you can submit your continuing education certificates of completion to the state along with your renewal form.