UPDATE instructors
SET user_id = (
    SELECT u.id
    FROM users u
    WHERE u.tenant_id = instructors.tenant_id
      AND u.role = 'instructor'
      AND u.first_name = instructors.first_name
      AND u.last_name = instructors.last_name
    LIMIT 1
)
WHERE user_id IS NULL;
