That mod rewrite looks close. I think it should be:
RewriteRule ^study/([^/]*)/([^/]*)/([^/]*)$ /study.php?pageNum_q=$1&totalRows_q=$2&test_id=$3 [L]
the mod rewrite wont' update your links for you. It allows you to update your links. Once the mod rewrite is correct, test it by manually entering the new url syntax into the browser: study/4/20/31090
once that works then you can go through and update all of your links to follow that new syntax.