A 5.4-magnitude earthquake rocked a key oil-producing region in West Texas, rattling parts of the Permian basin.