execute select query in a locked block to avoid receive a SQLITE_BUSY response from sqlite