That syntax is correct. If it's not working, it's because the values aren't what you expect, not because you have the syntax wrong.
Use the debugger built into your browser to figure it out. To make that easier, you can put things in variables first:
var $win = $(window);
var scrollTop = $win.scrollTop();
var width = $win.width();
if (scrollTop >= origOffsetY && width < 801) {
// do something
}
Now you can put a breakpoint on the if statement, and inspect the values of the scrollTop and width and origOffsetY variables. Or alternately, add console.log statements to dump them out (useful for when stopping the script with a breakpoint is awkward).
&&in brackets?