UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'W4iP1XaBkrkcOMBKOcyGvVvH5qXJuHtdXuSa630bxWE=' 
WHERE 
  key_id = '448e2d02a5e341afa38825483b340120bffb2bf782af4c07e131eb054957d480' 
  AND (
    token = 'W4iP1XaBkrkcOMBKOcyGvVvH5qXJuHtdXuSa630bxWE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046