There is no point in using sqlx if it is used like that...
Remove all SQL_Connect, SQL_PrepareQuery, SQL_Execute and use SQL_ThreadQuery instead.
edit:
With SQL_ThreadQuery you can check all players simultaneously and there will be no lag.
I don't understand what is this plugin supposed to do. It would make sense if there was only 1 map on server, but once map changes and players vote again, then vote for previous map is overwritten.
I checked orginal plugin and in my opinion it suck...