You can renew up to thirty days before it expires. Be careful coming back Thai government said they do accept the vaccine done 14 days before or after six months.
Paul Durkan. Your post said you had a Certificate of Residency. You will need a second Certificate of Resiency from the seller if he or she is non Thai. Just like I said before
Anything is possible if you want to spend the money. A Visa agency can do but it could cost you around 30,000 BHT. Go to Immigration and ask. Do not rely on people who may or not know what all requirements are. The biggest hurdle in doing yourself is meeting the financial obligations.