A surprised monster who rolls a 20+ on initiative can use lair actions because they are able to take actions, and their turn has passed
As you've quoted, the rules on lair actions state:
On initiative count 20 (losing all initiative ties), it can use one of its lair action options. It can’t do so while incapacitated or otherwise unable to take actions. If surprised, it can’t use one until after its first turn in the combat.
Thus we know how to determine whether a monster can take lair actions:
1. Can it take actions in general?
2. Is it surprised? If so, has its turn passed already?
If the answer to 1 is "no" then the monster cannot take lair actions.
If the answer to 2 is "yes" and then "no" then the monster cannot take lair actions.
The section on "Surprise" states:
[...] If you're surprised, you can't move or take an action on your first turn of the combat, and you can't take a reaction until that turn ends [...]
You are only prevented from taking actions on your first turn, thus, if it is not your turn, you are not being prevented from taking actions.
If the monster rolls above a 20 then at initiative count 20 their turn will have already passed and so neither method of preventing lair actions is in-play. Note that in the case that they do roll a 20 the lair actions will still be after their turn as they "lose all initiative ties", so they won't be prevented from taking lair actions if they roll anything 20+.
Do note that the final sentence in the quote is not redundant:
If surprised, it can’t use one until after its first turn in the combat.
If a monster is surprised and rolled below a 20, then on initiative count 20 nothing prevents them from taking actions (as it is not their turn), but they are surprised and so they cannot take lair actions.
A result of this literal reading of Surprise is that any creature can take actions while surprised so long as that action is not on their turn. That said, surprise explicitly forbids reactions until after your turn, and bonus actions must always be on your own turn.