EV3 Multiple conditions: wait sensor activation for N seconds or
Here's some pseudocode that does what you need:  

Reset timer
Loop block:
    Sensor block, output logical TRUE when condition is reached
    Timer block, output logical TRUE when X seconds have passed
    Logic block, outputs logical TRUE if sensor OR timer is true
End loop when it receives TRUE from the Logic block.
Switch block:
    if sensor = condition, SEQUENCE B
End switch
SEQUENCE A


The sensor and timer blocks' logical data wires are connected to the logic block. The logic block is set to "OR", which ends the loop if either one is true. Then you use a switch to decide whether or not to execute SEQUENCE B, and after that, SEQUENCE A happens regardless.