Отредактировано
sql.execute(f"UPDATE users SET message = {random[0]} WHERE id = {user[0]};")
db.commit()
sql.execute(f"UPDATE users SET message = '{random[0]}' WHERE id = '{user[0]}';")
db.commit()
sql.execute("UPDATE users SET message = ? WHERE id = ?;", (random[0], user[0]))
db.commit()