I got my Magic Keyboard a few days ago and was asking the same question. I've been Lysol spraying my packages externally and trying to clean the items as best as I can after opening. With something like this, it's trickier obviously but luckily Apple released a support article on how to clean your iPhone.
Learn how to clean your iPhone.
support.apple.com
When I got my Magic Keyboard at night it was too late to really play around with it, so I left it opened and sitting overnight. In the morning I got Windex on a paper towel and cleaned the outside and hinge. I also very gently cleaned the keys but didn't want to even risk damaging it.
The virus is supposed to only last a few days on surfaces so if you want to be completely completely safe, open the iPad and let it sit for a few days without using it. It's awful, I know, but peace of mind might be more worth it than using the iPad for an extra few hours.
If not, visit the link above. Apple was pretty thorough about what you need to use to clean it.