I am not sure about the lock type Firefox uses, but I'd recommend this:
Copy the Firefox database file to a different temporary location and read it from there (this also lowers the risk of accidentally damaging the original file).
I haven't had problems with this method yet on Firefox 3.*.