A token system using SQL