What do you mean, "remove"? What "other operations"?
You've managed to post a whole bunch of code, but wouldn't you know, when asking for help with a thing, giving a description of what you want to do is more important than the code itself!
One-time password. Like those 6-digit numbers you get from SMS or "authenticator" apps that cycle every 30 seconds.
Such as this algorithm,
$acct_otp = substr(number_format(time() * rand(), 0, '', ''), 0, 6);
(which is terrible and should never be used by anyone for any reason)