I should've written the complete update statement:
Parameters:
@StoreID int,
@CategoryID int,
@ReferenceID int = NULL
UPDATE MyTable
Set MyStatus = 'Closed'
WHERE StoreID = @StoreID
AND MyCategoryID = @CategoryID
AND MyStatusID IN ('Open', 'Acknow')
AND (@ReferenceID IS NULL OR...