in Turkey before your 90 days allowance in Protected content finish. You must make the online appointment application before your current visa expires. Appointment date would probably be after your visa expires and it is fine as long as the appointment application is made before your visa expires.You cannot leave Turkey until you have your residence permit once your visa expires.
If anyone of you left Turkey even getting no visa and if visa was expired after 90 days, have you got any problem to come back to Turkey, have you paid an amend ? Now we cannot accept that people have to wait for their visa, as unfortunaltly the immigation office is giving appoitment for march Protected content !!! ( depending of the district or for first application ). All countries consulate have to be aware of that problem and to discuss with Turkish foreign office !! Even foreign office opens night appointments, this is not enough !!