UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Eq1oTTc9KL1RPxqoFpGTpkf4vxh2sOpN6k39ewMDlgI=' 
WHERE 
  key_id = '19a58264b498571f762a91934afaad7c4e5ba783889f4ddd86cdec47fbb8fa15' 
  AND (
    token = 'Eq1oTTc9KL1RPxqoFpGTpkf4vxh2sOpN6k39ewMDlgI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031