UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5BuIOYuiD2Ng/oxmocs6seH0ws/byY1E2JMlexBBd4s=' 
WHERE 
  key_id = '1b1c7ee8546b310983968721d3dadc3933e6f6f407bc16f7d87cf43d7f69bc10' 
  AND (
    token = '5BuIOYuiD2Ng/oxmocs6seH0ws/byY1E2JMlexBBd4s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020