can I force a draw if I am running out of time?
Of course! Just swap the queen for the rook.
There are two basic possibilities.
He keeps the king and rook very close (normal best practice when trying to draw this difficult endgame). In that case every time you threaten the rook with your queen he must move the rook and keep it close to the king. It should ...
Moving your queen next to your king and moving your king in a diamond around your queen for up to 30 moves seems like it’d be decently fast and not need much thought if you’re really low on time. Every move up to and including the draw is as short as possible, distance-wise.
It sounds like you have all the tools to do the job, you just need to put it all together. And yes, you can use the magic numbers you found.
When your engine initializes (or any time before you begin the search, really) you'll need to pre-compute the move board for every possible permutation of blockers you might encounter during the search.