In PHP è semplice creare un token identificativo per ciascun utente.
La soluzione è la seguente:
function uniq_user_token() {
$id = uniqid();
$str = password_hash($id, PASSWORD_DEFAULT);
return strtolower(preg_replace('/[^a-z0-9]+/i', '', $str));
}