I looked at several local hospital's websites and found one for $45, provided by The American Heart Association. The classes run anywhere from $45-$70. Many community colleges offer CPR classes. Check the local cc's continuing education class schedule.
Make sure are registering for the healthcare CPR, and that it is for a NEW certification, not a renewal!!! The one you had previously, even if it was still good, probably wouldn't have been the correct version.
We learned CPR on the adult, child, and infant, as well as how to use and became certified for use of the AED. (Defibrillator)
As the others have posted, the card is good for about two years, depending on the version. However, many schools
require you to get recertified every year. Don't think of this as a hassle, but a refresher just in case you need to use it.
As for the online course, I wouldn't do it. You may end up with a CPR card that your school will not accept. More importantly, you need to have hands on experience with CPR & AED. You may have to save a life in the future with your skills, and you really wouldn't want to rely on something you just read.
Good luck to you!