UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'q61C4HN+Y9GVqT0mAcEZFgdksz7tn5Xe0OSznNUa1Io=' 
WHERE 
  key_id = '55c09cda9261795b90bf95eba7c437740e3971aabfd2d7788e7c536d2f9d6a54' 
  AND (
    token = 'q61C4HN+Y9GVqT0mAcEZFgdksz7tn5Xe0OSznNUa1Io=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041