@Henning *********
I'm assuming the school gave you all the documents you need.
Each immigration office has their own requirements for the documents required to get the extension of stay based on being a student.
You can read the requirements for Bangkok's immigration from their website at
*****************************************
*****
(point 9).
Each immigration office has their own policy on how soon you can renew. Some allow you to renew it 45 days in advance, other's 30.