I`m no expert and every situation such as yours has non standard circumstances, I`d get advice from the Spanish Consulate.
But in general you`ll probably need to leave Spain, return to your home country and re apply for a Residency Visa.You may well be turned down as you have over stayed, i`m guessing by quite some time, the authorities do look at that.Your saving grace may well be the situation with the children.
I would seek legal advice, soon.Although nobody has noticed yet, both your Visa and Residency has expired, if a Policia notices, you could be deported.Also if you ever need to visit relatives and need to leave the country, you wouldn`t be granted permission to renter.
Try giving these guys a call and get some legal advice.
http://www.spainlawyer.com/index.cfm