UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VRQDaIl65EmOse3a06LWdDfP9dsEtTm/7I4P0IASZ1U=' 
WHERE 
  key_id = 'b45f8ff7fcefa3a22a402af4b1ee614aebcbc787bf70e1563ae545f47fa9d3ab' 
  AND (
    token = 'VRQDaIl65EmOse3a06LWdDfP9dsEtTm/7I4P0IASZ1U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020