If he attentively listened to the verse of prostration during the prayer, he should move just his head down to signify prostration, and his prayer will not be invalidated. If he only heard the verse, then he should still do the same based on compulsory precaution. If he does not do so, he has committed a sin, but the prayer is not invalidated.