Can't the crew health certificate expire? Can the contract expire?

Yes

According to the regulations, if the validity period of the health certificate during the voyage expires, the health certificate will remain valid until it reaches the next port of call recognized by the contracting party, but the period shall not exceed 3 months.

Seafarers' health certificates can be certified and replaced one month in advance in the hospital where the last physical examination was made.