Sorry, I really don't see issue with your code.
What do you mean doesn't work? Does our code even fully execute, storing your bans in ULib.bans, or does it get overwritten by Rubidum?
ULib.addbans, and by extension, ULib.banid, is intended to update current bans, and it works to do that.
If Rubidium creates duplicate rows rather than modify existing for the same table, that's not really a ULib or ULX issue, but instead a Rubidium duplicate issue.
I didn't study Rubidium page too closely, nor have access (or want to) it's codebase - does it have lua code that overwrites our functions? If so, that could be part of the issue. It's possible ULib.bans never sees new bans.
As for that "error" you're getting, any idea what's creating it?
It's this person's steam account.
http://steamcommunity.com/id/BeBillyIf it's not anyone you may know, perhaps you have exploit code running that command to unban that steamid every so often.