This Sacrament is not only for those in danger of death - it is also for anyone suffering any kind of illness or hardship.
By the sacred anointing of the sick and the prayer of the priests the whole Church commends those who are ill to the suffering and glorified Lord, that he may raise them up and save them and indeed she exhorts them to contribute to the good of the People of God by freely uniting themselves to the Passion and death of Christ.
-Catechism of the Catholic Church 1499