There are a few exceptions to this rule. First, if the car is being sold to a licensed dealer, the dealer can purchase the car with an expired inspection sticker and then have it inspected before reselling it. Second, if the car is being sold to someone who is out of state, the buyer can purchase the car with an expired inspection sticker and then have it inspected in their home state.
If you are caught selling a car with an expired inspection sticker, you could be fined up to $200. In addition, the buyer of the car could sue you for damages if they are injured in an accident caused by a defect that the inspection would have revealed.