It's best to apply for renewal of your ID card three months before its expiration, because there is a three-month processing cycle for your ID card at the longest. You'd better get a new card, and the old card will be invalid. Don't delay it. To apply for a new ID card, you need to bring your household registration book and old ID card to the public security organ (police station or accreditation hall) where your household registration is located. The fee is 20 yuan.
Legal basis: "Regulations of the People's Republic of China on the Administration of Resident Identity Cards" Article 6 A citizen shall apply to the household registration authority where his permanent residence is located for a resident identity card, and go through the application procedures in accordance with the regulations.