UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '90CV6qKRV6T3+OsuR0JiYtV1pLypheS0hDUuEly/51A='
WHERE
key_id = '05121d01217fe4680ad7a042737add758379942ca3ae639b4605bb2df0418978'
AND (
token = '90CV6qKRV6T3+OsuR0JiYtV1pLypheS0hDUuEly/51A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)