UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oRu+lZ0Wsrcd1ciGmsKHg+KHB1N2Nxqy129b3hc1Jes=' 
WHERE 
  key_id = '84bdf827759e98fbeb543bc552c546770efbb95c40b0ddc4adf21e76607f649f' 
  AND (
    token = 'oRu+lZ0Wsrcd1ciGmsKHg+KHB1N2Nxqy129b3hc1Jes=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028