Train travel between Poland, Lithuania and Latvia is currently very cumbersome. The following thread may be relevant for this:
Are there trains beween Tallinn, Riga and Warsaw?
This means that you should go by bus. As an example, Lux Express, has a daily departure to Vilnius, from where you can proceed to Riga. Currently, the bus leaves Warsaw at 18:25 and arrives in Riga at 15:25 the following day. This will leave you a 2 hours buffer in Riga. Note that the bus and railway stations there are next to each other. This way, Warsaw-Moscow will take you about 40 hours.
However, if you want to bypass Belarus, you have another option: going by train via Kyïv. There is a direct night train from Warsaw to Kyïv, and there are direct trains from Kyïv to Moscow. Currently you can leave Warsaw at 16:50 and arrive in Moscow at 4:32 two days later, after a journey of nearly 35 hours, with a change of trains in Kyïv. Another possibility is to travel via Lviv. This option may be interesting if you also want to visit Krakow or other places in southeastern Poland.