A regularity criterion for local strong solutions to the 3D Stokes-MHD equations