Do you replace it depending on years (4 years) , kilometers (40,000 kms) or wear?

My car turned 4 already and the tires aren't worn out yet. I'm not sure if casa ever rotated the tires during PMS. The car has about 35k on the odometer. I am wondering if the tires are still safe to use?