A direct-numerical-simulation-based second-moment closure for turbulent magnetohydrodynamic flows