On both Windows and Mac machines, the Esc key will help you mark the message as read. Alt + Shift + up / down arrows are a great way to flip through messages before marking them as read. This shortcut will in turn take you through unread messages. If you want, Slack also has the option to automatically mark any chat room as soon as you read it.
There is also a faster option that Shift + Escape allows to mark all messages as read. There are many other useful shortcuts that you can find at Slack's Help page.