Peace be upon you. It does not harm the validity of the fast. However, if the saliva returns to the mouth and then goes down into the stomach without being consumed in the saliva, it would invalidate the fast. According to Ayatollah Sistani, merely moistening the lips with the tongue does not affect the validity of the fast as long as nothing enters the stomach. Similarly, Ayatollah Khamenei states that simply moistening the lips with the tongue does not harm the fast unless something enters the stomach without being consumed in the saliva. May you be successful in all good.