You can write:
case Some(prevTimestamp) if (timestamp <= prevTimestamp) => true
case _ => lastWriteTimestamp.compareAndSet(savedTimestamp, Some(timestamp))