Ok, that's very strange. Definitely sounds like MySQL is a bit of sync since when you try to insert a new post, it thinks 25749 is already in there. Perhaps try repairing the table:

repair table ubbt_POSTS