Improve the achievement insert SQL

Still WIP, not functional
Add function UnlockAchievement()