It didn't happened to me but there are ants on my table and keyboard and I saw the same problem with other people that I've met online. Ants on modems, laptops, desktops and other devices that these ants can stay.
I guess you eat when you use your laptop and when there are ants on my table, the same procedure as @peter0425 did, I spray alcohol on my table and luckily, they were gone.
If worse case scenario happens and your laptop suddenly shut downs, it's possible that those ants affected the board.