Question:
A person who does not keep Torah and mitzvos is allowed to bless the blessing of Hagomel?
Answer:
it’s better prevented from blessing as long as he has not returned Betshuva and especially if his salvation came by an act of prohibition, such as, traveling on Shabbat.
Sources